package cn.itsy.service.warntype;

import cn.itsy.dao.warntype.WarnTypeDao;
import cn.itsy.pojo.Warnrule;
import cn.itsy.pojo.Warntype;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-06-03 11:18
 */
@Service(value = "warntypeimpl")
public class Warntypeimpl implements WarnTypeService {
    @Resource(name = "warnTypeDaoimpl")
    private WarnTypeDao warnTypeDao;

    @Override
    public List<Warntype> queryWarntypeAll(String sql) {
        List<Warntype> warntypes = this.warnTypeDao.qyertWarnTypeAll(sql);
        return warntypes;
    }

    @Override
    public void insertWarnType(String sql, Warntype warntype) {
        this.warnTypeDao.insertWarnType(sql, warntype);
    }

    @Override
    public void updateWarnType(String sql, Warntype warntype) {
        this.warnTypeDao.updateWarnType(sql, warntype);
    }

    @Override
    public List<Warnrule> queryWarnruleById(String sql, Warntype warntype) {
        List<Warnrule> warnrules = this.warnTypeDao.queryWarnruleById(sql, warntype);
        return warnrules;
    }

    @Override
    public void updateWarnTypeStatusById(String sql, Warntype warntype) {
        this.warnTypeDao.updateWarnTypeStatusById(sql, warntype);
    }
}
